//
//  BinvitPerLstTableViewCell.m
//  DistributorAB
//
//  Created by 主事丫环 on 2019/5/20.
//  Copyright © 2019 主事丫环. All rights reserved.
//

#import "BinvitPerLstTableViewCell.h"

@implementation BinvitPerLstTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)Brefash:(BinvitivepersonModel *)model{
    
   model.image_url =  [model.image_url substringFromIndex:8];
    if ([model.image_url hasPrefix:@"http"]) {
        [self.myimage sd_setImageWithURL:[NSURL URLWithString:model.image_url] placeholderImage:defaultImg];
    }else{
        sdimg(self.myimage, model.image_url);
        
    }
    if ([model.personName isEqualToString:@"无师傅"]) {
        self.namelB.text = @"暂未注册";
    }else{
        self.namelB.text = [NSString stringWithFormat:@"%@",model.personName];
    }
    self.timeLB.text = [NSString stringWithFormat:@"%@加入",[model.create_time substringToIndex:10]];
    
    self.phone = [NSString stringWithFormat:@"%@",model.phone];
    
    self.youkeLB.hidden = YES;

//    if (strIsEmpty(model.invitation_code)) {
//        self.youkeLB.hidden = NO;
//    }
    
    
}
- (IBAction)cellbhon:(UIButton *)sender {
    [HFTools callMobilePhone:_phone];
}

@end
